CREATE TABLE jms_dm.dm_tab_departure_build_package_network_summary_dt
(
    scan_site_code    varchar(100) comment '建包中心code',
    site_agent_code   varchar(100) comment '建包中心所属代理区code',
    scan_site         varchar(100) comment '建包中心name',
    site_agent_name   varchar(100) comment '建包中心所属代理区name',
    pick_network_code varchar(100) comment '取件网点code',
    pick_network_name varchar(100) comment '取件网点name',
    date_time         date comment '扫描日期',
    buil_bag_num      int comment '建包票数'
) ENGINE = olap DUPLICATE KEY(scan_site_code,site_agent_code)
COMMENT '出港建包监控日报汇总'
PARTITION BY RANGE (date_time) (
    START ('2023-11-01') END ('2024-01-26') EVERY (INTERVAL 1 Day)
)
DISTRIBUTED BY HASH(pick_network_code) BUCKETS 1
PROPERTIES (
'replication_num' = '3',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-100',
'dynamic_partition.end' = '2',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '1',
'in_memory' = 'false',
'storage_format' = 'V2'
);
